<template>
  <div class="search">
   <Header></Header>
   <Content :list="hotList"></Content>
  </div>
</template>
<script>
import Header from '@/components/search/Header';
import Content from '@/components/search/Content';
import {getHotList} from '@/api/list.js';
export default {
  name:'Search',
  components:{Header,Content},
  data(){
    return{
      hotList:[]
    }
  },
  created(){
    this.getData()
  },
  methods:{
    async getData(){
      let res = await getHotList();
      this.hotList = res.data.hot;
    }
  }
}
</script>
